
<body style="overflow: hidden">
<script type="text/javascript" src="<?php echo base_url('skin/js/userprofile.js'); ?>"></script>
<script type="text/javascript" src="<?php echo base_url('skin/js/postalcode.js'); ?>"></script>
<div class="fbcont">

	<div class="bannersaktofb"></div>
	<div id="phoneGalleryfbnobg">

		<div class="width791c padding20 alignCenter textBlue z5 fontLight">
			<a href="<?php  echo site_url('welcome'); ?>" class="block posabsofb fontBold textBlue textdecounderfb textdecounderrev font12fb">Home</a> 
        </div>

	    <div class="wizard marg20topfb margbot15yv">
			<a href="<?php  echo site_url('gallery'); ?>" class="current done">
			<span class="wiz1"></span>
				 <p class="font15mtop10fb wiz1to4wcustom">Pick a gadget</p>
			</a>
			<a href="<?php  echo site_url('promo'); ?>" class="current done">
			 <span class="wiz2"></span>
				 <p class="font15mtop10fb wiz1to4wcustom">Choose your promo</p>
			</a>
			<a href="<?php  echo site_url('prepaid'); ?>" class="current done">
			 <span class="wiz3"></span>
				 <p class="font15mtop10fb wiz1to4wcustom">Enter your mobile number</p>
			</a>
			<a href="<?php  echo site_url('userprofile'); ?>" class="current done">
			 <span class="wiz4"></span>
				 <p class="font15mtop10fb wiz1to4wcustom">Complete your profile</p>
			</a>
			<a href="<?php  echo site_url('globestore'); ?>" class="width100">
			 <span class="wiz5"></span>
				 <p class="font15mtop10fb wiz5wcustom">Select your preferred Globe Store branch for handset pickup	</p>
			</a>
		</div>	

		<div class="width791c comparesfb">

			<div class="deviceInfosIns floatLeft">
				<div class="deviceBox active">
					<p><b>Gadget:</b></p>
					<p><?php if(isset($_COOKIE['fb_gadget'])) echo $_COOKIE['fb_gadget']; ?> - <?php if(isset($_COOKIE['fb_price'])) echo $_COOKIE['fb_price']; ?></p>
				</div>
							 
				<div class="promoBox active">
					<p><b>Promo:</b></p>
					<p><?php if(isset($_COOKIE['fb_promo'])) echo $_COOKIE['fb_promo']; ?></p>
				</div>
									
				<div class="commitmentBox active">
					<p><b>Registration Period <br> and Savings:</b></p>
					<p><?php if(isset($_COOKIE['fb_commitmentBox'])) echo $_COOKIE['fb_commitmentBox']; ?></p>
				</div>
									
				<div class="prepaidBox active">
					<p><b>Mobile Number:</b></p>
					<p><?php if(isset($_COOKIE['fb_mobtel'])) echo $_COOKIE['fb_mobtel']; ?></p>
				</div>
									
				<div class="profileBox">
					<p><b>Profile:</b><p>
					<p class="pnone">None</p>
					<p style="display:none" id="pname"><span id="name"></span></p>
					<p style="display:none" id="pemail">Email Address:<br><span id="email"></span></p>
					<p style="display:none" id="pdob">Date of Birth:<br><span id="dob"></span></p>
					<p style="display:none" id="padd">Home Address:<br><span id="add"></span>
				</div>
									
				<div class="storeBox">
					<p><b>Globe Store Branch:</b></p>
					<p id="globestore">None</p>
				</div>   
			</div>
					
					
			<div class="devicegalfbcont">
                

				<div>
                	<p class="header30 marg0topfb marg15bot">User profile</p>
                    
                    <p class="text16 floatLeft marg0">Please provide the following:	</p>
                    <p class="floatRight text14 marg0 redText">* Required fields</p>
                    
                    <div class="clear"></div>
                    
                    <?php if(isset($_COOKIE['fb_mode'])): ?>
						<?php if($_COOKIE['fb_mode']=="edit"): ?>
							<form id="userinfo" class="marg40" method="post" action="<?php echo base_url('index.php/summary'); ?>">
						<?php else: ?>
							<form id="userinfo" class="marg40" method="post" action="<?php echo base_url('index.php/globestore'); ?>">
						<?php endif;?>
					<?php else: ?>
						<form id="userinfo" class="marg40" method="post" action="<?php echo base_url('index.php/globestore'); ?>">
					<?php endif;?>

					<?php if(!empty($userinfo)): ?>	
                    <?php foreach($userinfo as $user){ ?> 

                        <div class="floatLeft width155fb marg10Right">
							<label class="text14">First name <span class="redText">*</span></label>
							<input type="text" id="Fname" name="Fname" class="inputText width131fb marg10Top" maxlength="100" value="<?php echo $user["fName"]; ?>" />
                        </div>
                        <div class="floatLeft width155fb marg10Right">
							<label class="text14">Middle name <span class="redText">*</span></label>
							<input type="text" id="Mname" name="Mname" class="inputText width131fb marg10Top" maxlength="100" value="<?php echo $user["mName"]; ?>" />
                        </div>
                        <div class="floatLeft width155fb marg10Right">
							<label class="text14">Last name <span class="redText">*</span></label>
							<input type="text" id="Lname" name="Lname" class="inputText width131fb marg10Top" maxlength="100" value="<?php echo $user["lName"]; ?>" />
                        </div>
                        
                        <span class="clear"></span>
                        
                        <div class="width155fb marg10Top">
							<label class="text14">Nickname (optional)</label>
							<input type="text" id="Nname" name="Nname" class="inputText width131fb marg10Top" maxlength="16" value="<?php echo $user["nName"]; ?>" />
                        </div>
 
                        <div class="width350 marg10Top marg0rightfb">
							<label class="text14 ">Email address<span class="redText">*</span></label>
                        </div>
                        <input id="Eadd" name="Eadd" type="text" class="inputText width300 marg10Top" maxlength="100" value="<?php echo $user["email"]; ?>" />
                        <span id="email-error" style="display:none;" class="invalidem redText text14 marg0 marg20Left">Invalid email format</span>
          
                        <div class="width350 marg10Top">
							<label class="text14">Other contact number (optional)</label>
							<input id="Othercont" name="Othercont" type="text" class="inputText width185 marg10Top" maxlength="20" value="<?php echo $user["otherCont"]; ?>" />
                        </div>
                        
                        <div class="width215 marg10Top posRel calendarBut">
							<label class="text14">Date of birth<span class="redText">*</span></label>
							<input type="text" id="datepicker" name="birthday" class="inputText width185 marg10Top" value="<?php echo $user["birthdate"]; ?>" />
                        </div>
                        
                        <div class="marg40Top"></div>
                        
                        <div class="w96p5 marg10Top">
							<label class="text14"><span>Home address</span><br><br>
							<span>House/ Room/ Floor no./ Building name and Street name<span class="redText">*</span></span></label>
							<input type="text" id="Address" name="Address" class="inputText w96p5 marg10Top" value="<?php echo $user["street"]; ?>" />
                        </div>

                        <div class="floatLeft dropw235fb marg20Right marg10Top">
							<label class="text14">Province<span class="redText">*</span></label>
							<select type="text" id="Province" name="Province" class="dropw235fb marg10Top" maxlength="10" value="<?php echo $user["province"]; ?>"></select>
                        </div>
                        
						<div class="floatLeft dropw235fb marg10Top">
							<label class="text14">City/ Town<span class="redText">*</span></label>
							<select type="text" id="City" name="City" class="dropw235fb marg10Top disable" maxlength="10" value="<?php echo $user["town"]; ?>"></select>
                        </div>
                        
                        <span class="clear"></span>
                        
                        <div class="floatLeft dropw235fb marg20Right marg10Top">
							<label class="text14">Area/ Barangay<span class="redText" id="areabrgy">*</span></label>
							<select type="text" id="Barangay" name="Barangay" class="dropw235fb marg10Top disable" maxlength="10" value="<?php echo $user["area"]; ?>"></select>
                        </div>
						
                        <div class="floatLeft width211fb marg10Top">
							<label class="text14">Postal code<span class="redText">*</span></label>
							<select type="text" id="Pcode" name="Pcode" class="dropw235fb marg10Top disable" maxlength="10" value="<?php echo $user["postalCode"]; ?>"></select>
                        </div>
                        
                        <span class="clear"></span>
                        <a href="#." id="btn_next" class="buttonBlue floatRight marg40Top Price"><span class="posRel" id="btn_next2">Next</span></a>					

					<?php } ?>
					<?php else: ?>

                        <div class="floatLeft width155fb marg10Right">
							<label class="text14">First name <span class="redText">*</span></label>
							<input type="text" id="Fname" name="Fname" class="inputText width131fb marg10Top" maxlength="100" />
                        </div>
                        <div class="floatLeft width155fb marg10Right">
							<label class="text14">Middle name <span class="redText">*</span></label>
							<input type="text" id="Mname" name="Mname" class="inputText width131fb marg10Top" maxlength="100" />
                        </div>
                        <div class="floatLeft width155fb marg10Right">
							<label class="text14">Last name <span class="redText">*</span></label>
							<input type="text" id="Lname" name="Lname" class="inputText width131fb marg10Top" maxlength="100" />
                        </div>
                        
                        <span class="clear"></span>
                        
                        <div class="width155fb marg10Top">
							<label class="text14">Nickname (optional)</label>
							<input type="text" id="Nname" name="Nname" class="inputText width131fb marg10Top" maxlength="16" />
                        </div>
 
                        <div class="width350 marg10Top marg0rightfb">
							<label class="text14 ">Email address<span class="redText">*</span></label>
                        </div>
                        <input id="Eadd" name="Eadd" type="text" class="inputText width300 marg10Top" maxlength="100" />
                        <span id="email-error" style="display:none;" class="invalidem redText text14 marg0 marg20Left">Invalid email format</span>
          
                        <div class="width350 marg10Top">
							<label class="text14">Other contact number (optional)</label>
							<input id="Othercont" name="Othercont" type="text" class="inputText width185 marg10Top" maxlength="20" />
                        </div>
                        
                        <div class="width215 marg10Top posRel calendarBut">
							<label class="text14">Date of birth<span class="redText">*</span></label>
							<input type="text" id="datepicker" name="birthday" class="inputText width185 marg10Top"/>
                        </div>
                        
                        <div class="marg40Top"></div>
                        
                        <div class="w96p5 marg10Top">
							<label class="text14"><span>Home address</span><br><br>
							<span>House/ Room/ Floor no./ Building name and Street name<span class="redText">*</span></span></label>
							<input type="text" id="Address" name="Address" class="inputText w96p5 marg10Top"/>
                        </div>

                        <div class="floatLeft dropw235fb marg20Right marg10Top">
							<label class="text14">Province<span class="redText">*</span></label>
							<select type="text" id="Province" name="Province" class="dropw235fb marg10Top" maxlength="10"></select>
                        </div>
                        
						<div class="floatLeft dropw235fb marg10Top">
							<label class="text14">City/ Town<span class="redText">*</span></label>
							<select type="text" id="City" name="City" class="dropw235fb marg10Top disable" maxlength="10"></select>
                        </div>
                        
                        <span class="clear"></span>
                        
                        <div class="floatLeft dropw235fb marg20Right marg10Top">
							<label class="text14">Area/ Barangay<span class="redText" id="areabrgy">*</span></label>
							<select type="text" id="Barangay" name="Barangay" class="dropw235fb marg10Top disable" maxlength="10"></select>
                        </div>
						
                        <div class="floatLeft width211fb marg10Top">
							<label class="text14">Postal code<span class="redText">*</span></label>
							<select type="text" id="Pcode" name="Pcode" class="dropw235fb marg10Top disable" maxlength="10"></select>
                        </div>
                        
                        <span class="clear"></span>
                        <a href="#." id="btn_next" class="buttonBlue floatRight marg40Top Price"><span class="posRel" id="btn_next2">Next</span></a>					

					<?php endif; ?>
                    </form>
                    
                </div>

			</div>					
					
			<div class="clear"></div>	
		</div>

		 
	</div>
</div>


<script type="text/javascript">
		jQuery(function(){
			jQuery("select").select2();
			jQuery( "#datepicker" ).datepicker({
			  showOn: "button",
			  maxDate: -1,
			  buttonImage: "../skin/images/icons/calendar.png",
			  buttonImageOnly: true,
			  changeMonth: true,
     		  changeYear: true,
			  yearRange:"1900:c"
			});
		})
</script>